package com.rran.study.designpattern.behavioral.chain.chain.spring;

import com.rran.study.designpattern.behavioral.chain.annotation.HandlerChain;
import com.rran.study.designpattern.behavioral.chain.enums.ChainType;
import com.rran.study.designpattern.behavioral.chain.enums.HandleResult;
import com.rran.study.designpattern.behavioral.chain.model.ChainContext;
import org.springframework.stereotype.Component;

/**
 * @author yy
 * @Type AttackPlaceASpringChain.java
 * @Desc 进攻A点
 * @date 2020/7/20 14:12
 */
@HandlerChain(chainType = ChainType.ATTACK,
        isHead = true,
        actionName = "ATTACK_A",
        nextHandler = "attackPlaceBSpringChain")
@Component("attackPlaceASpringChain")
public class AttackPlaceASpringChain extends AbstractAttackPlaceSpringChain {

    @Override
    public HandleResult doHandle(ChainContext context) {
        System.out.println("ATTACK A");
        return HandleResult.CONTINUE;
    }
}
